Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid READ command in stream mode #5408

Closed
wants to merge 1 commit into from

Conversation

tomykaira
Copy link

Description

Some mouse modules (in my case, X19 trackball) seems not responding to
PS2_MOUSE_READ command when operating in stream mode. Instead, new data
are uploaded by push from the device to the host. Because of that, when
mouse cursor is not moving, read commands succeed but no data arrive, so
the following routine must wait for 4 x 25 = 100 ms. This slows down
all other proocedures in the chip.

This change is to use pushed data, and stop pulling when no data are
available.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Some mouse modules (in my case, X19 trackball) seems not responding to
PS2_MOUSE_READ command when operating in stream mode.  Instead, new data
are uploaded by push from the device to the host. Because of that, when
mouse cursor is not moving, read commands succeed but no data arrive, so
the following routine must wait for 4 x 25 = 100 ms. This slows down
all other proocedures in the chip.

This change is to use pushed data, and stop pulling when no data are
available.
@yanfali
Copy link
Contributor

yanfali commented Mar 14, 2019

My only concern with this change is testing it with hardware which does not exhibit this behavior. Can we find another user of ps2 mouse?

@drashna
Copy link
Member

drashna commented Mar 14, 2019

Better yet, making this configurable, so you can enable if if needed, without breaking the implementation for others.

@skullydazed
Copy link
Member

@tomykaira This change looks good at its core but I agree with drashna that we should make this configurable with a #define. Is that something you're working on?

@drashna
Copy link
Member

drashna commented Sep 21, 2019

There are a number of merge conflicts here.

Could you update the PR to fix these?

@tomykaira tomykaira closed this Oct 8, 2019
@and3rson
Copy link
Contributor

Sorry for necrobumping, but has there been any follow-up on this? I'm experiencing the same issue as this PR attempts to solve. Matrix scans become ~10 times slower with both interrupt & USART mode, which renders my rotary encoder pretty useless. I'm willing to do the testing if necessary.

@and3rson and3rson mentioned this pull request May 16, 2022
14 tasks
and3rson added a commit to and3rson/qmk_firmware that referenced this pull request May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants